Enables objects to be addressed at run-time as a string parameter using the object name.
文字列パラメータにオブジェクト名を指定することで、実行時に該当オブジェクトへアクセスします。
For instance, the command:
たとえば、下記のコマンドを行ったとします。
MyObj.Prop1.Command = 5
MyObj.Prop1.Command = 5
corresponds to the following command block:
この処理は、下記のコマンドブロックに対応します。
Dim ObjVar as Object
Dim ObjVar as Object
Dim ObjProp as Object
Dim ObjProp as Object
ObjName As String = "MyObj"
ObjName As String = "MyObj"
ObjVar = FindObject( ObjName As String )
ObjVar = FindObject( ObjName As String )
PropName As String = "Prop1"
PropName As String = "Prop1"
ObjProp = FindPropertyObject( ObjVar, PropName As String )
ObjProp = FindPropertyObject( ObjVar, PropName As String )
ObjProp.Command = 5
ObjProp.Command = 5
To dynamically create Names at run-time, use:
実行時に名前を動的に定義するには、
"TextEdit1" to TextEdit5" in a loop to create five names.
ループを使用して「TextEdit1」から「TextEdit5」の 5 つの名前を作成します。
See also: FindObject
次も参照してください:FindObject
FindPropertyObject( ObjVar, PropName As String )
FindPropertyObject( ObjVar, PropName As String )
ObjVar: Object variable that you want to dynamically define at run-time.
ObjVar: 実行時に動的に定義するオブジェクト変数。
PropName: String that specifies the name of the property that you want to address at run-time.
PropName: 実行時にアクセスする属性名を指定する文字列。